package com.hnichr.ump.common.assessment.entity;

import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_assessment_tenant_user",uniqueConstraints=@UniqueConstraint(columnNames={"USERNAME_","TENANT_ID_"}))
@Schema(description = "测评系统租户用户对应表")
public class TenantUser extends UmpEntity {
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;

    @Column(name = "TENANT_ID_")
    @Schema(description = "租户")
    @Dict(dicCode = "BEISEN_ACTIVITY_TENANT")
    private String tenantId;

    @Column(name = "USERNAME_")
    @Schema(description = "用户")
    private String userName;

    @Column(name = "NICKNAME_")
    @Schema(description = "昵称")
    private String nickName;
}
